<template>
  <span @click="openUserInfo">
    <a-popover v-if="appUserInfoId" title="个人信息">
      <template slot="content">
        <p>点击可查看用户个人信息</p>
      </template>
      <span class="iconfont icon-shenfenmingpian" style="font-size: 24px;color: #2878FF"></span>
    </a-popover>
    <!-- 新增 || 编辑用户 -->
    <EditUserInfo ref="EditUserInfo" :disabled="true" />
  </span>
</template>
<script>
import EditUserInfo from '@/components/UserComponents/editInfo.vue'
import { getUserDetail } from '@/api/member/user'
export default {
  name: 'UserIconAction',
  props: {
    appUserInfoId: {
      type: Number,
      default: undefined
    }
  },
  components: {
    EditUserInfo
  },
  methods: {
    async openUserInfo() {
      const res = await getUserDetail(this.appUserInfoId)
      this.$refs.EditUserInfo.show(res.data)
    }
  }
}
</script>
